using System.ComponentModel.Composition;
using System.Threading;
using AndyPike.Experiments.MEF.Contracts;

namespace AndyPike.Experiments.MEF
{
    [Export(typeof(ITextFormatter))]
    public class ProperCaseTextFormatter : ITextFormatter
    {
        public string Format(string text)
        {
            return Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(text);
        }

        public override string ToString()
        {
            return "Proper Case";
        }
    }
}